Skip to content

London | 26-ITP-SEP | Abdennour Hachemi | Sprint 1 | form-controls - #1503

Open
AbdennourHachemi wants to merge 7 commits into
CodeYourFuture:mainfrom
AbdennourHachemi:feature/form-controls
Open

London | 26-ITP-SEP | Abdennour Hachemi | Sprint 1 | form-controls#1503
AbdennourHachemi wants to merge 7 commits into
CodeYourFuture:mainfrom
AbdennourHachemi:feature/form-controls

Conversation

@AbdennourHachemi

@AbdennourHachemi AbdennourHachemi commented Sep 11, 2026

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Task code

CYF-1004

A solution to the T-shirt order form using HTML , i have added an external css file , had to close to first pull request since there were some accessiblity issues, I was confused on how to do the PR , but the instructions and searching the net was helpful.

@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for cyf-onboarding-module failed. Why did it fail? →

Name Link
🔨 Latest commit 5923885
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/6aa819f2ddaeef0008ae9233

@AbdennourHachemi AbdennourHachemi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 11, 2026

@abdishakoor-dev abdishakoor-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start, and the coloured squares behind the colour options are a nice touch. Things to sort before it can be marked Complete:

  1. No submit button, so the form can't be submitted and none of the validation ever runs. See line 90.
  2. Name isn't required. The pattern is there, but without required an empty name goes through. See line 20.
  3. Size isn't required. See line 55.
  4. A stray full stop on line 50 shows up on the page, and the HTML validator from the README checklist (https://validator.w3.org/) reports one error, on line 39.
  5. Formatting. Prettier fails on both files. Run npx prettier --write Form-Controls from the repo root and push.

Add the Needs Review label again once you've pushed.

Comment thread Form-Controls/index.html Outdated
</div>
</div>
</div>
</form>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The form closes here with no submit button. Open the deploy preview and try to send the form. What's missing, and what does the browser do with required and pattern until it's there?

Comment thread Form-Controls/index.html Outdated
<main>
<form>
<div id="fn"><label for="fname">Please Enter your First name:</label>
<input type="text" id="fname" name="fname" pattern=".*\S.*\S.*"> <br>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern attribute is right and does what the README asks, but the field isn't required. Once you've added a submit button, leave the name empty and submit. It will go through. Which attribute is missing? Also, the task asks for one name field, not first and last.

Comment thread Form-Controls/index.html Outdated
<div class="sizeOption">
<label for="xs">XS</label>
<div>
<input type="radio" name="size" value="xs" id="xs">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the six size radios has required, so a size is optional. You've already solved this for colour on line 45. Same thing here.

Comment thread Form-Controls/index.html Outdated
<input type="email" id="email" name="email" required><br>
</div>
<div class="colorSelection">
<label>Please pick a color:</label> <br>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This label isn't attached to any control, it's just acting as a heading for the group. Which element does the MDN page from the prep use to group a set of radio buttons and give them a caption? Same for line 50.

Comment thread Form-Controls/index.html Outdated
</div>
</div>
<div id="sizediv">
<label>Please select the t-shirt size:</label> <br> .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a stray . after the <br> here and it shows on the page.

Comment thread Form-Controls/index.html Outdated
<div class="colorOption">
<label for="greenOption">Green</label>
<div class="square" id="greenOptions">
<input type="radio" name="color" id="greenOption"value="green">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space between id="greenOption" and value="green". This is the one error the HTML validator (https://validator.w3.org/, from the README checklist) reports. The formatter will fix it.

@abdishakoor-dev abdishakoor-dev added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants